module.exports = {
  /**
   * 获取我的用户信息
   * @url user/kh/getMyUserInfo 前端调用的url参数地址
   */
	main: async (event) => {
		// 业务逻辑开始-----------------------------------------------------------
		let { data = {}, userInfo, util } = event;
		let { uniID, vk, _, db } = util;
		let { user_id } = data;
		let res = { code : 0, msg : '' };
    if (!user_id) {
      return {
        code: 412,
        msg: 'id不能为空'
      }
    }
		let userRes = await db.collection("uni-id-users").where({
		  _id: user_id
		}).get();
		if (userRes.data.length > 0) {
		  res.userInfo = userRes.data[0]
    }
		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}